package com.parsechina.hpush.broker.internal.listener;

import com.parsechina.hpush.broker.spi.ProtocolProcessor;
import org.redisson.api.listener.MessageListener;

/**
 * @author linfeng
 * @date 2019-08-20
 **/
public abstract class BaseMessageListener<T> implements MessageListener<T> {

    private final ProtocolProcessor protocolProcessor;
    private final String instanceId;

    BaseMessageListener(ProtocolProcessor protocolProcessor, String instanceId) {
        this.protocolProcessor = protocolProcessor;
        this.instanceId = instanceId;
    }

    public ProtocolProcessor getProtocolProcessor() {
        return protocolProcessor;
    }

    public String getInstanceId() {
        return instanceId;
    }
}
